# -*- coding:utf-8 -*-
# --author： jingfeng 
# time: 2019/3/9


from pymongo import *


class MyMongodb():
    def __init__(self):

        self.client = MongoClient(host='localhost', port=27017, root='zhipeng',
                         password='zhipeng')


        self.db = self.client['weixin']
        self.collection = self.db['article']


    def insert(self,info):
        self.collection.insert(info)
